﻿using System.ComponentModel.DataAnnotations;

namespace FlyingHat.Core.Entities
{
    /// <summary>
    /// 图书室
    /// </summary>
    public class Library : BaseEntity
    {
        /// <summary>
        /// 图书室名称
        /// </summary>
        [Required, StringLength(50)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 编号
        /// </summary>
        [Required, StringLength(50)]
        public string Code { get; set; } = string.Empty;

        /// <summary>
        /// 位置
        /// </summary>
        [Required, StringLength(100)]
        public string Location { get; set; } = string.Empty;

        /// <summary>
        /// 是否允许进入
        /// </summary>
        public bool IsOpen { get; set; }
    }
}
